package com.hz.ys_production.action;


import com.hz.framework.MyAction.BaseAction;
import com.hz.framework.dao.CommonDao;
import com.hz.ys_production.dao.TaskStartDao;

/**
 * *****************************************************************************
 *               Copyright(c) 2010 by 哈尔滨华泽数码科技有限公司.
 *                       All rights reserved.
 *******************************************************************************
 *     File Name         :  com.hz.ys_stock.action.StatisticsAction.java
 *     Description(说明)	: 原材料管理 action
 * -----------------------------------------------------------------------------
 *     No.        Date              Revised by           Description	
 *     			  Jul 29, 2011           韩飞              Created
 *****************************************************************************
 */
public class TaskStartAction extends BaseAction {

	private static final long serialVersionUID = 1L;
	
	private Object pagList = null;

	/**
	 * @author 韩飞
	 * @time Nov 19, 2011	
	 * @return
	 * @throws Exception 
	 * 方法功能: 进料统计
	 */
	public String Task_Stat() throws Exception {
		boolean selflag = true;
		boolean pagflag = false;
		String rn = "";
		TaskStartDao sd = new TaskStartDao();
		String operate = CommonDao.isnull(request.getParameter("operate"));
//		已开工
		if("start".equals(operate)){
			rn = "start";
		}
//		未开工
		if("notstart".equals(operate)){
			rn = "notstart";
		}
		if("dostart".equals(operate)){
			sd.doStartTask(request);
			operate = "notstart";
			rn = "notstart";
		}
//		默认列表页面
		if(selflag){
			pagList = sd.SelTaskStart(request ,operate);
			pagflag = true;
		}
//		配置分页
		if(pagflag){
			doAllSearchList(request, "listinfo", pagList, "jdbc");
		}
		
		return rn;
	}
	
	
	
	
}
